import type { FetchDataWrapper } from './wrapper';

interface TaskResourceItem {
  task_name: string;
  cluster_name: string;
  task_phase: string;
  task_replica: string;
  cpu_total_usage: number;
  gpu_total_usage: number;
  memory_total_usage: number;
  create_at: string | number;
  duration: number;
}

export type TaskResourceList = TaskResourceItem[];

export type TaskResourceFetchData = FetchDataWrapper<TaskResourceList>;

interface ClusterInfoItem {
  id: string;
  name: string;
  address: string;
  cluster_type: string;
  cluster_region: string; // (add) 集群域
}

interface ClusterInfoList {
  clusters: ClusterInfoItem[];
}

export type TaskSelectedListFetchData = FetchDataWrapper<ClusterInfoList>;
